<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/6
 * Time: 10:44
 */

namespace app\admin\controller\store;


use app\admin\controller\BaseController;
use app\admin\model\StoreInfo;
use think\Controller;
use think\Session;

class Apply extends BaseController
{
    public function page(){
        $storeInfo=new StoreInfo();
        $user=(new Session())->get("user");
        if($user["id"]){
            $items=$storeInfo->where([
                "apply_status"      =>0,
                "menber_id"         =>$user["id"]
            ])->paginate(15);
        }else{
            $items=$storeInfo->where([
                "apply_status"      =>0
            ])->paginate(15);
        }

        $page=$items->render();
        $this->assign("items",$items);
        $this->assign("page",$items);
        return $this->fetch("index");
    }

    //处理请求
    public function deal(){

        return $this->fetch("store/stay_in/edit");
    }

    public function edit(){

        return $this->fetch();
    }
}